var STScrollComponent = function( isVirtical, headImageSrc, bodyImageSrc, tailImageSrc )
{
	var _component = document.createElement( "div" );
	_component.style.position = "absolute";
	
	var _head = document.createElement( "img" );
	var _body = document.createElement( "img" );
	var _tail = document.createElement( "img" );
	
	_head.onload = function()
	{
		// 가로? 세로? 레이아웃 적용
		if( isVirtical )
		{
			_component.style.width = this.width;
			_head.style.display = "block";
			_body.style.display = "block";
			_tail.style.display = "block";
		}else{
			_component.style.height = this.height;
		}
	}
	_head.src = headImageSrc;
	_body.src = bodyImageSrc;
	_tail.src = tailImageSrc;
	
	
	_component.appendChild( _head );
	_component.appendChild( _body );
	_component.appendChild( _tail );
	
	// 컴포넌트 반환
	this.getView = function()
	{
		return _component;
	}
	
	// 크기 조정
	var _size = 0;
	this.setSize = function( value )
	{
		if( _size == value ) return;
		_size = value;
		var _propertyName = (isVirtical?"height":"width" );
		_body[ _propertyName ] = Math.max( 0, _size-Number( _head[_propertyName] )-Number( _tail[_propertyName] ) );
		
		_propertyName = (!isVirtical?"height":"width" );
		_body[ _propertyName ] = _head[_propertyName];
	}
	this.getSize = function()
	{
		var _propertyName = (isVirtical?"height":"width" );
		return Number( _head[_propertyName] )+Number( _body[ _propertyName ] )+Number( _tail[_propertyName] );
	}
	var _minSize = -1;
	this.getMinSize= function()
	{
		if( _minSize < 0 )
		{
			var _propertyName = (isVirtical?"height":"width" );
			_minSize = Number( _head[_propertyName] )+Number( _tail[_propertyName] );
		}
		return _minSize;
	}
	
}